package org.xi.structural.flyweight.impl;

import org.xi.structural.flyweight.api.Icon;

/**
 * 具体享元类
 */
public class ConcreteIcon implements Icon {
    private final String shape; // 内部状态，图标形状，例如 "circle"

    public ConcreteIcon(String shape) {
        this.shape = shape;
    }

    @Override
    public void draw(int x, int y, int size, String color) {
        // 假设的绘制逻辑，实际中可能涉及图形库调用
        System.out.printf("Drawing icon of shape '%s' at (%d, %d) with size %d and color %s%n", shape, x, y, size, color);
    }
}